package com.crl.gClient.state.action
{
	import com.crl.core.animation.AbstractAnimationPlayer;
	import com.crl.game.simulation.client.ActorProxy;
	import com.crl.game.simulation.client.view.ActorView;
	import com.crl.game.simulation.common.action.AbstractAction;
	import com.crl.game.simulation.common.action.IAction;
	import com.crl.game.simulation.server.Actor;
	
	public class WalkAction extends AbstractAction implements IAction
	{
		private var speed:int;
		private var animation:AbstractAnimationPlayer;
		
		public function WalkAction(paths:Array,speed:int=8)
		{
			this.speed=speed;
		}
		
		override public function start(actor:ActorProxy):void
		{
			var view:ActorView=actor.getView();
			
			animation=view.getAnimation();
			
			animation.gotoAndPlay(0,"walk");
		}
		
		protected function finishWalk():void{
			animation.gotoAndStop(0,"stand");
		}
		
		override public function tick(time:int):void{
		}
	}
}